version: '3.8'

services:
  flask_app1:
    build:
      context: ./flask
    networks:
      - internal_network
    container_name: flask_flask_app1

  flask_app2:
    build:
      context: ./flask
    networks:
      - internal_network
    container_name: flask_flask_app2

  load_balancer:
    image: nginx:latest
    volumes:
      - ./nginx/nginx.conf:/etc/nginx/nginx.conf
    ports:
      - "5000:80"
    networks:
      - internal_network

networks:
  internal_network: